<template>
  <view class="component">
    <up-modal :show="true" :closeOnClickOverlay="true" :showConfirmButton="true" :showCancelButton="true" confirmText="继续盘点" @confirm="handleConfirm" @cancel="close">
      您当前还有未完成盘点的任务，请确认是否继续盘点？
    </up-modal>
  </view>
</template>

<script setup lang="ts">
import { ROUTE } from '@/constant/constant';

import { ComponentInternalInstance } from 'vue';

const emit = defineEmits(['update:modelValue', 'goCount']);
const {proxy} = getCurrentInstance() as ComponentInternalInstance;
const handleConfirm = () => {
  proxy?.$tab.navigateTo(ROUTE.PAGE_APPS.PREVIOUS_COUNT)
  emit('goCount');
  close();
}

function close () {
  console.log('close');
  emit('update:modelValue', false);
}
</script>

<style scoped>

</style>